<script setup lang="ts">
import { ConfigProvider } from 'ant-design-vue'
import zhCN from 'ant-design-vue/es/locale/zh_CN'
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
import Header from '@/components/Header/index.vue'
import { useGlobalStore } from './store/global'
import { onMounted } from 'vue'

dayjs.locale('zh-cn')

const { initDateTypes } = useGlobalStore()

onMounted(initDateTypes)
</script>

<template>
  <ConfigProvider
    :locale="zhCN"
    :theme="{
      token: {
        colorPrimary: '#0FB2FF',
        colorBgBase: 'rgba(8,27,53,0.85)',
        colorTextBase: '#fff',
      },
    }"
  >
    <Header />
    <main>
      <router-view />
    </main>
  </ConfigProvider>
</template>
